<template>
  <div>
    <CommendItem v-for="v in v.commend" :key="v.id" :v="v" />
    <van-icon name="plus" class="add" @click="$router.push('/write/message?id=' + v.id)" />
  </div>
</template>

<script setup>
import { ref } from 'vue'
import axios from 'axios'
import { useRoute } from 'vue-router'
import CommendItem from '@/components/commendItem/index.vue'
const route = useRoute()
const { id } = route.params
const v = ref({})
const _getV = async () => {
  const resp = await axios.get(`/api/list/${id}`)
  console.log(resp.data.data)
  v.value = resp.data.data
}
_getV()
</script>

<style lang="scss" scoped>
.add {
  position: fixed;
  right: 20px;
  bottom: 20px;
  font-size: 100px;
}
</style>
